Skip to content

Conversation

vigy02
Copy link

@vigy02 vigy02 commented Oct 3, 2025

Description of changes

This PR fixes a critical timestamp duplication issue in the DCA (Document Capture and Analysis) liveness detection feature that was causing video truncation.

Problem:

  • Color sequences 0 and 1 were receiving identical timestamps
  • This caused the video recording to be truncated at the first sequence transition
  • The issue occurred because the transition check happened on the same tick as the initial sequence start

Solution:

  • Skip the transition check on the first tick to ensure a minimum 10ms gap between sequence timestamps
  • This guarantees unique timestamps for each color sequence
  • Removed unused sequenceStartTime variables to pass linting

Changes:

  • Modified ColorSequenceDisplay.ts to add #isFirstTick flag
  • Skip transition logic on first tick, allowing time to elapse before next sequence
  • Cleaned up unused variables and simplified #handleSequenceChange method

Issue #, if available

N/A - This fixes a regression in the DCA v2 liveness detection implementation

Description of how you validated changes

  • ✅ Built packages successfully with no TypeScript errors
  • ✅ Verified timestamp logic ensures minimum 10ms gap between sequences
  • ✅ Linting passes with no unused variable warnings
  • 🔄 Testing in DCA app to verify video recording captures all sequences

Checklist

  • Have read the Pull Request Guidelines
  • PR description included
  • yarn test passes and tests are updated/added
  • PR title and commit messages follow conventional commit syntax
  • Changeset added (if version bump needed)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@vigy02 vigy02 requested a review from a team as a code owner October 3, 2025 03:32
Copy link

changeset-bot bot commented Oct 3, 2025

⚠️ No Changeset found

Latest commit: 72e0db8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants